package second.string;

public class Solution03 {
    public String replaceSpace(String s) {
        if (s == null) return null;
        StringBuilder string = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == ' ') string.append("%20");
            else string.append(s.charAt(i));
        }
        return string.toString();
    }
}
